<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:composition>
		
		<h:panelGroup id="metadataValueInputPanel" layout="block">
			<h:panelGroup layout="block" rendered="#{not empty incMetadataValueInputBean.addedMetaDataValues}" >
				<h:outputText value="Zusatz-Info: " />
				<ui:repeat var="metadataValueElement" value="#{incMetadataValueInputBean.addedMetaDataValues}">
					<h:outputText value="#{metadataValueElement.metadata.name}:&nbsp;#{metadataValueElement.value}, " />
				</ui:repeat>
			</h:panelGroup>
			<h:panelGrid columns="3">	
				<h:column>
					<p:selectOneMenu id="metadatadefSelection" value="#{incMetadataValueInputBean.selectedMetaDataDef}" 
						filter="true" filterMatchMode="contains" converter="#{incMetadataValueInputBean.metadataConverter}">
						<f:selectItems value="#{incMetadataValueInputBean.availableMetadataDefinitions}" var="metadataDefinition" itemLabel="#{metadataDefinition.name}" />
					</p:selectOneMenu>
					<h:outputText value="&nbsp;" />
				</h:column>
				<h:column>
					<p:inputText id="metadataValueInput" value="#{incMetadataValueInputBean.metadataValue}" required="true" requiredMessage="#{messages.input_required}" />
				</h:column>
				<h:column>
					<p:commandButton id="metadataValueAddButton" action="#{incMetadataValueInputBean.addMetadataValue}" value="klick mich" 
						process="metadataValueInputPanel" update="metadataValueInputPanel #{outerIdsToUpdate}" />
				</h:column>
			</h:panelGrid>
			<p:message id="metadataValueMessage" for="metadataValueInput" />
		</h:panelGroup>
	</ui:composition>
</html>